<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="ViewRoster.aspx.cs" 
        Inherits="InstructorPages_ViewRoster" Title="Untitled Page" %>
        
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<h1>Select one of your coures to view student roster</h1>
<asp:Label ID="dbErrorLabel" runat="server" ForeColor="red" />
<p>
<asp:ListBox ID="courseList" 
    runat="server" 
    SelectionMode="single" 
    Rows="1" />
<asp:Button ID="courseSelect" 
    Text="Select" 
    runat="server" 
    OnClick="courseSelect_Click" />
</p>
<asp:GridView ID="grid" 
    runat="server" 
    AutoGenerateColumns="False" 
    OnSelectedIndexChanged="grid_OnSelectedIndexChanged" 
    Visible="true" >
    <Columns>
        <asp:BoundField DataField="LAST" HeaderText="Last Name" />
        <asp:BoundField DataField="FIRST" HeaderText="First Name" />
        <asp:BoundField DataField="EMAIL" HeaderText="Email" />
        <asp:ButtonField CommandName="Select" Text="View student info" />
    </Columns>
    <RowStyle BackColor="#EFF3FB" />
    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
    <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
    <EditRowStyle BackColor="#2461BF" />
    <AlternatingRowStyle BackColor="White" />
</asp:GridView>

<br />
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server" >
<asp:DetailsView ID="studentDetails" 
    runat="server" 
    AutoGenerateRows="False" >
    <Fields>
        <asp:TemplateField HeaderText="Student ID:">
            <ItemTemplate>
                <asp:Label ID="typeLabel" 
                    runat="server" 
                    Text='<%#Bind("STUDENT_ID") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="First Name:">
            <ItemTemplate>
                <asp:Label ID="typeLabel" 
                    runat="server" 
                    Text='<%#Bind("FIRST") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Last Name:">
            <ItemTemplate>
                <asp:Label ID="titleLabel" 
                    runat="server" 
                    Text='<%#Bind("LAST") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Email:">
            <ItemTemplate>
                <asp:Label ID="typeLabel" 
                    runat="server" 
                    Text='<%#Bind("EMAIL") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Phone:">
            <ItemTemplate>
                <asp:Label ID="typeLabel" 
                    runat="server" 
                    Text='<%#Bind("PHONE") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Username:">
            <ItemTemplate>
                <asp:Label ID="typeLabel" 
                    runat="server" 
                    Text='<%#Bind("USER") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Status:">
            <ItemTemplate>
                <asp:Label ID="typeLabel" 
                    runat="server" 
                    Text='<%#Bind("STATUS") %>'/>
            </ItemTemplate>
        </asp:TemplateField>
    </Fields>
</asp:DetailsView>
</asp:Content>

